<template>
<h2>vue:{{ message }}</h2>
<home></home>
<button @click="message='vue'">改变message</button>
</template>
<script>
import Home from './Home.vue'
// 获取响应式数据 使用computed函数
import { computed } from 'vue'
export default {
    components: {
        Home
    },
    data() {
        return {
            message: "hello"
        }   
    },
    provide() {
        return {
            name: "xiaoran",
            age: 19,
            message: computed(() => {
                return this.message
            })
        }
    },
}
</script>
<style scoped lang="less">

</style>